package com.qf.pojo;

import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.ObjectSerializer;

import java.io.IOException;
import java.lang.reflect.Type;

public class MyJsonSerialize implements ObjectSerializer {


    /**
     *
     * @param serializer  设置 json序列化值
     * @param object  原属性的值
     * @param fieldName  字段名称
     * @param fieldType  字段类型
     * @param features
     * @throws IOException
     */
    @Override
    public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException {
        serializer.write(object + "块");
    }
}


